home *** CD-ROM | disk | FTP | other *** search
- #ifndef LOC_SOURCE_CODE_H
- #define LOC_SOURCE_CODE_H
- /****************************************************************************
- *
- * $RCSfile: SourceCode.h $
- * $Revision: 2.8 $
- * $Date: 2004/08/18 21:46:32 $
- * $Author: ssolie $
- *
- *****************************************************************************
- *
- * Copyright (c) 2004 Steven Solie. All Rights Reserved.
- *
- *****************************************************************************
- *
- * SourceCode component
- */
-
- #include "Main.h"
-
- #include <vector>
-
-
- class FileCount;
-
- class SourceCode {
- public:
- SourceCode(FileCount& fc);
- ~SourceCode();
- void load();
- void count();
- private:
- void removeComments();
- void eatWhite();
- private:
- FileCount& m_file_count;
- char m_line_buf[MAX_LINE_LEN + 1];
- bool m_in_comment;
- char* m_source_buf;
- int32 m_source_size; // size in bytes
- std::vector<char*> m_lines;
- };
-
-
- #endif
-